﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;

namespace FiddlerTextWizard
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //载入Fiddler.exe
            var assembly = Assembly.LoadFrom("Fiddler.exe");
            //获取私有类型
            var textWizardType = assembly.GetType("Fiddler.frmTextWizard");
        
            //创建非公开对象
            var textWizardForm = (Form)Activator.CreateInstance(textWizardType, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.CreateInstance,
                                null, new object[] { null }, null);

            Application.Run(textWizardForm);
        }
    }
}
